
    function loadProductTrack(){
        var datas = {access_token:getToken(),page_no:getPageNo()};
        $.ajax({
            url:getServerUrl()+"/Open/ComSys/sourcelist",
            type:'post',
            dataType:'json',
            data: datas,
            success:function(result){
                var rData =  result;
                rData.SiteUrl = getwindowhref();
                rData.Role = getUserRole();
                var html = template.render('home_body',rData);
                $("#content").html(html);
		      
				
				/* 遮罩  */
				$('.theme-login').click(function(){
					$('.theme-popover-mask').fadeIn(100);
					$('.theme-popover').slideDown(200);
					$('body').css({overflow:'hidden'});
				})
				$('.theme-popover-mask,.exit,.guanbi,.save').click(function(){
					$('.theme-popover-mask').fadeOut(100);
					$('.theme-popover').slideUp(200);
					$('body').css({overflowY:'scroll'});
				})
		        
                var Idenity = getIdentity();
                if(Idenity == '企业'){
                    var homepage = 'supper.html';
                }else if(Idenity == '网点'){
                    var homepage = 'website.html';
                }
                $('#idheader').append('<p class="h4">'
                    +'<a href="'+homepage+'"> <i class="fa fa-home"></i> <span>首页</span></a>&nbsp;>>&nbsp;'
                    + '产品默认溯源</p>'
                    +'<ul class="nav navbar-nav navbar-right">'
                    +'<li class="dropdown">'
                    + '<a href="#" class="dropdown-toggle" data-toggle="dropdown">'
                    + '<span class="thumb-sm avatar pull-left m-t-n-xs m-r-xs"><img src="style/images/avatar_default.jpg"></span>'
                    +'系统设置<b class="caret"></b>'
                    + '</a>'
                    +'<ul class="dropdown-menu animated fadeInLeft">'
                    + '<li><a href="company_pwd.html">修改密码</a></li>'
                    + '<li><a href="company_manage.html">用户管理</a></li>'
                    + '<li><a href="companyconfig.html">系统参数</a></li>'
                    +'</ul>'
                    +'</li>'
                    + '<li><a href="#" onclick="logout();"> <span>注销</span></a></li>'
                    +'</ul>'
                );
                showpage(rData.total_results,rData.page_no,rData.page_size,getwindowhref());
            }
        });
    }
    function addProductTrack(){
        var datas = {access_token:getToken()};
        $.ajax({
            url:getServerUrl()+"/Open/ComSys/getproductlist",
            type:'post',
            dataType:'json',
            data: datas,
            success:function(result){
                var rData =  result;
                var html = template.render('productlist_body',rData);
                $("#product_name").html(html);
            }
        });
        $.ajax({
            type: "post",
            url: getServerUrl() + "/Open/Company/getbranchlist", //与此php页面沟通
            dataType: 'json', //从php返回的值以 JSON方式 解释
            data: datas, //
            success: function (json) {//如果调用php成功
                clist = json.branchlist;
                var chtml = '';
                if (!empty(clist)) {
                    for (var i = 0; i < clist.length; i++) {
                        if (!empty(clist[i])) {
                            chtml = chtml + '<option value="'+ clist[i].bid+'">' + clist[i].name + '</option>';
                        }
                    }
                }
                $("#from_branch").append(chtml);
                $("#to_branch").append(chtml);
            },
            error:function(json){
                alertMessage(json.error_description);
            }
        });
    }

